from main import app
from fastapi.routing import APIRoute

def create_check():
    for route in app.routes:
        if isinstance(route, APIRoute):
            if route.path in ["/ops/api/v1/login", "/ops/api/v1/user/info"]:
                continue
            data = {"permission_name": route.name, "method": list(route.methods)[0].lower(),
                    "url": route.path, "tags": list(route.tags)[0].lower(),
                    "summary": route.summary, "description": route.description}